package com.bw.live_streaming.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.models.auth.In;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bw.common.utils.PageUtils;
import com.bw.common.utils.Query;

import com.bw.live_streaming.dao.SinatvDao;
import com.bw.live_streaming.entity.SinatvEntity;
import com.bw.live_streaming.service.SinatvService;


@Service("sinatvService")
public class SinatvServiceImpl extends ServiceImpl<SinatvDao, SinatvEntity> implements SinatvService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SinatvEntity> page = this.page(
                new Query<SinatvEntity>().getPage(params),
                new QueryWrapper<SinatvEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public IPage<SinatvEntity> getList(Integer page, Integer limit) {
        Page<SinatvEntity> entityPage = new Page<>(page, limit);
        return baseMapper.getList(entityPage);
    }


}